<template>
  <div class="data-analysis">
    <el-row>
      <el-col :span="4">
        <!-- 页面导航 -->
        <el-menu :default-active="activeIndex" @select="selectMenu">
          <nav-menu :navMenus="menuData" />
        </el-menu>
      </el-col>
      <!-- 页面主体内容 -->
      <el-col :span="20">
        <div class="container">
          <!-- <router-view></router-view> -->
          <warehousing-statistics v-if="componentsName === 'warehousingStatistics'" />
          <warehousing-summary v-if="componentsName === 'warehousingSummary'" />
          <stock-statistics v-if="componentsName === 'stockStatistics'" />
          <stock-summary v-if="componentsName === 'stockSummary'" />
          <inventory-statistics v-if="componentsName === 'inventoryStatistics'" />
          <inventory-summary v-if="componentsName === 'inventorySummary'" />
        </div>
      </el-col>
    </el-row>
  </div>
</template>

<script>
import navMenu from "./components/nav-menu.vue";

import warehousingStatistics from './storage/raw-material-report/warehousing/statistics.vue'
import warehousingSummary from './storage/raw-material-report/warehousing/summary.vue'
import stockStatistics from './storage/raw-material-report/stock/statistics.vue'
import stockSummary from './storage/raw-material-report/stock/summary.vue'
import inventoryStatistics from './storage/raw-material-report/inventory/statistics.vue'
import inventorySummary from './storage/raw-material-report/inventory/summary.vue'

export default {
  name: "",
  components: {
    navMenu,

    warehousingStatistics,
    warehousingSummary,
    stockStatistics,
    stockSummary,
    inventoryStatistics,
    inventorySummary
  },
  props: {},
  data() {
    return {
      activeIndex: "warehousingStatistics",
      menuData: [
        {
          entity: {
            id: 11,
            name: "storage",
            alias: "仓储统计分析",
          },
          childs: [
            {
              entity: {
                id: 12,
                name: "rawMaterialReport",
                alias: "原材报表",
              },
              childs: [
                {
                  entity: {
                    id: 13,
                    name: "warehousing",
                    alias: "原材入库报表",
                  },
                  childs: [
                    {
                      entity: {
                        id: 14,
                        name: "warehousingStatistics",
                        alias: "通用统计",
                      },
                    },
                    {
                      entity: {
                        id: 15,
                        name: "warehousingSummary",
                        alias: "原材入库汇总",
                      },
                    },
                  ],
                },
                {
                  entity: {
                    id: 16,
                    name: "stock",
                    alias: "原材库存报表",
                  },
                  childs: [
                    {
                      entity: {
                        id: 17,
                        name: "stockStatistics",
                        alias: "通用统计",
                      },
                    },
                    {
                      entity: {
                        id: 18,
                        name: "stockSummary",
                        alias: "原材入库汇总",
                      },
                    },
                  ],
                },
                {
                  entity: {
                    id: 19,
                    name: "inventory",
                    alias: "原材盘点报表",
                  },
                  childs: [
                    {
                      entity: {
                        id: 110,
                        name: "inventoryStatistics",
                        alias: "通用统计",
                      },
                    },
                    {
                      entity: {
                        id: 111,
                        name: "inventorySummary",
                        alias: "原材入库汇总",
                      },
                    },
                  ],
                },
              ],
            },
          ],
        },
        {
          entity: {
            id: 21,
            name: "production",
            alias: "生产统计分析",
          },
          childs: [
            {
              entity: {
                id: 22,
                name: "processingTypeReport",
                alias: "加工类型报表",
              },
              childs: [
                {
                  entity: {
                    id: 23,
                    name: "processingTypeReportStatistics",
                    alias: "通用统计",
                  },
                },
                {
                  entity: {
                    id: 24,
                    name: "processingTypeReportReportForms",
                    alias: "已加工完成套丝报表",
                  },
                },
              ],
            },
          ],
        },
      ],

      componentsName: 'warehousingStatistics'
    };
  },
  filters: {},
  computed: {},
  watch: {},
  created() {},
  mounted() {},
  beforeDestroy() {},
  methods: {
    selectMenu(val) {
      console.log(val);
      this.componentsName = val
    },
  },
};
</script>

<style scoped lang="scss">
.data-analysis {
  padding: 20px;
  .container {
    padding: 20px;
  }
}
</style>
